package utilities;

public class TestStat implements Archiveable {
	String name;
	double value;
	
	public TestStat() {
		name = "statName";
		value = 100.0;
	}
	
	public Archive save() {
		Archive archive = new JSONArchive();
		
		archive.putAttribute("name", this.name);
		archive.putAttribute("value", Double.toString(this.value));
		
		return archive;
	}
	
	public void load(Archive archive) {
		this.name = archive.getAttribute("name");
		this.value = Double.parseDouble(archive.getAttribute("value"));
	}
	
}
